package java0.homework.config;

import java0.homework.jdbc.MyJdbc;
import java0.homework.pojo.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * @author L.xf
 * @date 2021/10/22
 */
@Configuration
public class MyConfig {

    @Bean
    public Student student() {
        Student student = new Student();
        student.setName("123");
        return student;
    }

    @Bean
    public MyJdbc myJdbc(final JdbcTemplate jdbcTemplate) {
        return new MyJdbc(jdbcTemplate);
    }
}
